<div class="user">
    <ul>
        <#if user.departmentId==1>
            <li>
                <a href="${base}/admin/dataDicType/list/Parameter" target="_blank"><img src="${base}/static/images/icon_03.png"></a>
            </li>
        </#if>
        <li>
            <a class="btn2 result" href="javascript:void(0)"><img src="${base}/static/images/icon_04.png"><span>${user.userName}</span></a>
            <div class="select">
                <a href="${base}/admin/userView/profile?actionType=top&id=${(user.id?c)!}" >My Profile</a>
                <a href="${base}/admin/login">Sign Out</a>
            </div>
        </li>
    </ul>
</div>
<script>
    $(function(){
        $(".user").each(function() {
            var _this = $(this)
            var button = _this.find(".result");
            var select = _this.find(".select");
            button.on("click", function() {
                if ($(this).hasClass("open")) {
                    $(this).removeClass("open")
                    select.slideUp(300)
                } else {
                    $(".user .result").find('').removeClass('open');
                    $(".user li .select").slideUp(300)
                    $(this).addClass("open")
                    select.slideDown(300)
                }
            })
        });
    })
</script>